/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package projetointegrado;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

/**
 *
 * @author Emerson
 */
public class SalvaPlayer {
    public SalvaPlayer(Object p) throws FileNotFoundException, IOException{
        File arquivo = new File("playerStats.lol");
        FileOutputStream fos = new FileOutputStream(arquivo);
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(p);
        
        oos.flush();
        oos.close();
        fos.close();
    }
}
